import {RouteRecordRaw} from 'vue-router'

const route: RouteRecordRaw[] = [
  {
    path: '/content',
    name: 'main',
    component: () => import('@/layouts/main.vue'),
    meta: {menu: {title: '内容管理', icon: 'far fa-chart-bar'}},
    children: [
      {
        path: ':resource/list',
        name: 'content-list',
        props: true,
        meta: {
          menu: {
            public: [
              {path: '/content/courses/list', title: '课程管理'},
              {path: '/content/episodes/list', title: '课时管理'},
              {path: '/content/categories/list', title: '分类管理'},
            ],
          },
        },
        component: () => import('@/views/content/coursesCrud.vue'),
      },
    ],
  },
]

export default route
